<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'participant-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<?php 
		$uid = Yii::app()->user->id;
		$user=User::model()->find('id=?',array($uid));
		
		$event= Event::model()->find('E_id=?', array($_GET['id'])); 
		$eid= $event['E_id']; 
	?>
	
	
	<?php echo $form->hiddenField($model,'P_uid', array('value'=>$uid)); ?>

	<?php echo $form->hiddenField($model,'P_eid', array('value'=>$eid)); ?>
	
	<div class="row">
		<?php echo $form->labelEx($model,'P_fname'); ?>
		<?php echo $form->textField($model,'P_fname',array('size'=>30,'maxlength'=>30, 'value'=>$user['fname'])); ?>
		<?php echo $form->error($model,'P_fname'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'P_lname'); ?>
		<?php echo $form->textField($model,'P_lname',array('size'=>30,'maxlength'=>30, 'value'=>$user['lname'])); ?>
		<?php echo $form->error($model,'P_lname'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'P_minitial'); ?>
		<?php echo $form->textField($model,'P_minitial',array('size'=>1,'maxlength'=>1)); ?>
		<?php echo $form->error($model,'P_minitial'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'P_address'); ?>
		<?php echo $form->textArea($model,'P_address',array('rows'=>3, 'cols'=>40)); ?>
		<?php echo $form->error($model,'P_address'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'P_city'); ?>
		<?php echo $form->textField($model,'P_city'); ?>
		<?php echo $form->error($model,'P_city'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'P_state'); ?>
		<?php echo $form->textField($model,'P_state',array('size'=>2,'maxlength'=>2)); ?>
		<?php echo $form->error($model,'P_state'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'P_zip'); ?>
		<?php echo $form->textField($model,'P_zip'); ?>
		<?php echo $form->error($model,'P_zip'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'P_age'); ?>
		<?php echo $form->textField($model,'P_age'); ?>
		<?php echo $form->error($model,'P_age'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'P_current_grade'); ?>
		<?php echo $form->textField($model,'P_current_grade'); ?>
		<?php echo $form->error($model,'P_current_grade'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'P_school_district'); ?>
		<?php echo $form->textArea($model,'P_school_district',array('rows'=>3, 'cols'=>40)); ?>
		<?php echo $form->error($model,'P_school_district'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>
<?php $this->endWidget(); ?>

</div><!-- form -->